﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SevenAlgorithms.顺序查找
{
    internal class MainProject
    {
        static void Main(string[] args)
        {
            int[] array = new int[] { -1, 0, 3, 5, 9, 12 };

            Console.WriteLine(OrderFind(array, 12));
            Console.ReadKey();
        }

        public static int OrderFind(int[] nums,int target)
        {
            for (int i = 0; i < nums.Length; i++)
            {
                if (nums[i] == target) return i;
            }
            return -1;
        }
    }
}
